<template>
    <view>
        <!-- pages/goodlist/goodlist.wxml -->
        <view class="search" @tap="goToSearchPage"><search></search></view>
        <view class="goodlist">
            <list :cid="cid"></list>
        </view>
    </view>
</template>

<script>
import search from '../../Comp/search/search';
import list from '../../Comp/list/list';
// pages/goodlist/goodlist.js
export default {
    components: {
        search,
        list
    },
    data() {
        return {
            cid: ''
        };
    },
    onLoad: function (options) {
        if (options.cid) {
            this.setData({
                cid: options.cid
            });
        }
    },
    methods: {
        goToSearchPage: function () {
            uni.navigateTo({
                url: '/pages/search/search'
            });
        }
    }
};
</script>
<style>
/* pages/goodlist/goodlist.wxss */
.search {
    background-color: #ff3333;
    padding: 0;
    margin: 0;
    padding-bottom: 15rpx;
}
</style>
